package com.gimi.cloud.jimi.common.utils;

import java.io.*;
import java.math.BigDecimal;
import java.net.URISyntaxException;
import java.util.Properties;


public class SystemConfig {
	public static BigDecimal price = new BigDecimal(0);
	// 静态区加载
		static {
			try {
				String tempPath = Thread.currentThread().getContextClassLoader().getResource("").toURI().getPath() + "config.properties";
				Properties props = new Properties();
				InputStream ips;
				ips = new BufferedInputStream(new FileInputStream(tempPath));
				props.load(ips);
				ips.close();
				String value = props.getProperty("price");
				price = new BigDecimal(value);
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			} catch (URISyntaxException e) {
				e.printStackTrace();
			}
		}
		
		public static void main(String[] args) {
			System.out.println(price);
		}
}
